<template>
  <section>
    
    <!-- <btns @exec="exec"></btns> -->
    <div class="data-container scroll-table">
      <div class="flex">
        <div class="ind-title lh50 f16">用户反馈管理</div>
      </div>
      <el-table
        :data="tableData"
        @selection-change="tableSelectionChange"
        style="width: 100%"
        row-key="ifId"
        border
        lazy
      >
        <el-table-column label="序号" prop="index" type="index" width="100px"></el-table-column>

        <el-table-column prop="nickname" label="用户昵称"> </el-table-column>
        <el-table-column prop="phone" label="联系方式"> </el-table-column>
        <el-table-column prop="addtime" label="提交时间"> </el-table-column>
 
    

      
        <el-table-column label="操作" width="80">
          <template slot-scope="scope">
            <div  v-if="scope.row.state==0"  type="primary" @click="goInfo(scope.row.feedbackId)">查看详情</div>
          </template>
        </el-table-column>
      </el-table>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="currentPage"
        :page-sizes="[5, 10, 15, 20]"
        :page-size="pageSize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="total"
      >
      </el-pagination>
    </div>


    

  </section>
</template>
<style>
</style>
<script>


import btns from "@/components/btns.vue";
export default {
 components: {
    btns,
  
  },
  data() {
    return {
        currentPage: 1,
         pageSize: 10,
         total: 0,
         tableData:[],
    };
  },
  
  created() {
  
    this.getList();
    
  },
  methods: {
      goInfo(id){

      },
      tableSelectionChange(val) {
      this.tableSelection = val;
    },
    handleSizeChange(val) {
    this.pageSize = val;
    this.getList(this.currentPage, val);
    // eslint-disable-next-line no-console
    // console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      this.currentPage = val;
      this.getList(val, this.pageSize);
      // eslint-disable-next-line no-console
      // console.log(`当前页: ${val}`);
    },

      getList() {
      this.$api.banner
        .yonghufankui({
          current: this.currentPage,
          size: this.pageSize,
        })
        .then((d) => {
          if (d.code == 200) {
            this.tableData = d.data;
            this.total = d.totalCount;
     
          }
        });
      }
    },
    
  
};
</script>
